<template>
	<view>
		<view>
			<u-tabs :list="list"
				:activeStyle="{color: '#00be00'}"
				:inactiveStyle="{color: '#606266'}"
				@click="onTabChange"></u-tabs>
		</view>
		<view v-if="selectedTabValue === 'jy'">
			<uploadoilrecord></uploadoilrecord>
		</view>
		<view v-else>
			<uploadsetrecord></uploadsetrecord>
		</view>
	</view>
</template>

<script>
	import uploadoilrecord from './uploadoilrecord.vue'
	import uploadsetrecord from './uploadsetrecord.vue'
	export default {
		data() {
			return {
				selectedTabValue: 'jy',
				list: [{
					name: '加油',
					code: 'jy',
				}, {
					name: '套餐',
					code: 'tc',
				}]
			}
		},
		components:{
			uploadoilrecord,
			uploadsetrecord
		},
		methods: {
			onTabChange(item) {
				this.selectedTabValue = item.code;
			}
		}
	}
</script>

<style>

</style>
